import '@styles/style.scss'

// IconPark - 全局安装
import { install } from '@icon-park/vue-next/es/all';
import '@icon-park/vue-next/styles/index.css';

import { createApp } from 'vue'
import { createPinia } from 'pinia'

// ElementPlus 组件库 - 按需引入
import { 
    ElMessage, 
    ElMessageBox, 
    ElNotification,
    ElCarousel,
    ElCarouselItem,
    ElImage,
    ElForm,
    ElFormItem,
    ElInput,
    ElButton,
    ElTooltip,
    ElDivider,
    ElLink,
    ElLoading
} from 'element-plus'
import 'element-plus/dist/index.css'


// 时间库
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
dayjs.locale('zh-cn');

import App from './App.vue'
import router from './router'

const app = createApp(App)

// 安装 IconPark - 使用 'i' 前缀
install(app, 'i');

// 注册ElementPlus组件
app.use(ElMessage);
app.use(ElMessageBox);
app.use(ElNotification);
app.use(ElCarousel);
app.use(ElCarouselItem);
app.use(ElImage);
app.use(ElForm);
app.use(ElFormItem);
app.use(ElInput);
app.use(ElButton);
app.use(ElTooltip);
app.use(ElDivider);
app.use(ElLink);
app.use(ElLoading);

app.use(createPinia())
app.use(router)

app.mount('#app')
